# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>

pkgname=ocrad
pkgver=0.28
pkgrel=2
pkgdesc='OCR (Optical Character Recognition) program based on a feature extraction method'
arch=('loong64' 'x86_64')
url='https://www.gnu.org/software/ocrad/'
license=('GPL')
depends=('libpng')
source=("https://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.lz")
sha256sums=('34ccea576dbdadaa5979e6202344c3ff68737d829ca7b66f71c8497d36bbbf2e')

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr CXXFLAGS="$CXXFLAGS -ffat-lto-objects" LDFLAGS="$LDFLAGS"
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
